num = 3

def set_num():
    global num
    num = 4
    print(num)

set_num()
print(num)